3.91 \(\int x \cos (a+b \sqrt{c+d x}) \, dx\)

Optimal. Leaf size=167 \[ -\frac{12 \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}+\frac{6 (c+d x) \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{2 c \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{12 \cos \left (a+b \sqrt{c+d x}\right )}{b^4 d^2}+\frac{2 (c+d x)^{3/2} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 c \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2} \]

[Out]

(-12*Cos[a + b*Sqrt[c + d*x]])/(b^4*d^2) - (2*c*Cos[a + b*Sqrt[c + d*x]])/(b^2*d^2) + (6*(c + d*x)*Cos[a + b*S
qrt[c + d*x]])/(b^2*d^2) - (12*Sqrt[c + d*x]*Sin[a + b*Sqrt[c + d*x]])/(b^3*d^2) - (2*c*Sqrt[c + d*x]*Sin[a +
b*Sqrt[c + d*x]])/(b*d^2) + (2*(c + d*x)^(3/2)*Sin[a + b*Sqrt[c + d*x]])/(b*d^2)

________________________________________________________________________________________

Rubi [A]  time = 0.13634, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3432, 3296, 2638} \[ -\frac{12 \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}+\frac{6 (c+d x) \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{2 c \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{12 \cos \left (a+b \sqrt{c+d x}\right )}{b^4 d^2}+\frac{2 (c+d x)^{3/2} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{2 c \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2} \]

Antiderivative was successfully verified.

[In]

Int[x*Cos[a + b*Sqrt[c + d*x]],x]

[Out]

(-12*Cos[a + b*Sqrt[c + d*x]])/(b^4*d^2) - (2*c*Cos[a + b*Sqrt[c + d*x]])/(b^2*d^2) + (6*(c + d*x)*Cos[a + b*S
qrt[c + d*x]])/(b^2*d^2) - (12*Sqrt[c + d*x]*Sin[a + b*Sqrt[c + d*x]])/(b^3*d^2) - (2*c*Sqrt[c + d*x]*Sin[a +
b*Sqrt[c + d*x]])/(b*d^2) + (2*(c + d*x)^(3/2)*Sin[a + b*Sqrt[c + d*x]])/(b*d^2)

Rule 3432

Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_.) + (h_.)*(x_))^(m_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - (e*h)/f + (h*x^(1/n))/f)^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int x \cos \left (a+b \sqrt{c+d x}\right ) \, dx &=\frac{2 \operatorname{Subst}\left (\int \left (-\frac{c x \cos (a+b x)}{d}+\frac{x^3 \cos (a+b x)}{d}\right ) \, dx,x,\sqrt{c+d x}\right )}{d}\\ &=\frac{2 \operatorname{Subst}\left (\int x^3 \cos (a+b x) \, dx,x,\sqrt{c+d x}\right )}{d^2}-\frac{(2 c) \operatorname{Subst}\left (\int x \cos (a+b x) \, dx,x,\sqrt{c+d x}\right )}{d^2}\\ &=-\frac{2 c \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{2 (c+d x)^{3/2} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{6 \operatorname{Subst}\left (\int x^2 \sin (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b d^2}+\frac{(2 c) \operatorname{Subst}\left (\int \sin (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b d^2}\\ &=-\frac{2 c \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 (c+d x) \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{2 c \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{2 (c+d x)^{3/2} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}-\frac{12 \operatorname{Subst}\left (\int x \cos (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b^2 d^2}\\ &=-\frac{2 c \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 (c+d x) \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{12 \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}-\frac{2 c \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{2 (c+d x)^{3/2} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{12 \operatorname{Subst}\left (\int \sin (a+b x) \, dx,x,\sqrt{c+d x}\right )}{b^3 d^2}\\ &=-\frac{12 \cos \left (a+b \sqrt{c+d x}\right )}{b^4 d^2}-\frac{2 c \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}+\frac{6 (c+d x) \cos \left (a+b \sqrt{c+d x}\right )}{b^2 d^2}-\frac{12 \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b^3 d^2}-\frac{2 c \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}+\frac{2 (c+d x)^{3/2} \sin \left (a+b \sqrt{c+d x}\right )}{b d^2}\\ \end{align*}

Mathematica [A]  time = 0.275562, size = 71, normalized size = 0.43 \[ \frac{2 \left (b \left (b^2 d x-6\right ) \sqrt{c+d x} \sin \left (a+b \sqrt{c+d x}\right )+\left (b^2 (2 c+3 d x)-6\right ) \cos \left (a+b \sqrt{c+d x}\right )\right )}{b^4 d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*Cos[a + b*Sqrt[c + d*x]],x]

[Out]

(2*((-6 + b^2*(2*c + 3*d*x))*Cos[a + b*Sqrt[c + d*x]] + b*Sqrt[c + d*x]*(-6 + b^2*d*x)*Sin[a + b*Sqrt[c + d*x]
]))/(b^4*d^2)

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 299, normalized size = 1.8 \begin{align*} 2\,{\frac{1}{{b}^{2}{d}^{2}} \left ( -c \left ( \cos \left ( a+b\sqrt{dx+c} \right ) + \left ( a+b\sqrt{dx+c} \right ) \sin \left ( a+b\sqrt{dx+c} \right ) \right ) +ca\sin \left ( a+b\sqrt{dx+c} \right ) +{\frac{ \left ( a+b\sqrt{dx+c} \right ) ^{3}\sin \left ( a+b\sqrt{dx+c} \right ) +3\, \left ( a+b\sqrt{dx+c} \right ) ^{2}\cos \left ( a+b\sqrt{dx+c} \right ) -6\,\cos \left ( a+b\sqrt{dx+c} \right ) -6\, \left ( a+b\sqrt{dx+c} \right ) \sin \left ( a+b\sqrt{dx+c} \right ) }{{b}^{2}}}-3\,{\frac{a \left ( \left ( a+b\sqrt{dx+c} \right ) ^{2}\sin \left ( a+b\sqrt{dx+c} \right ) -2\,\sin \left ( a+b\sqrt{dx+c} \right ) +2\, \left ( a+b\sqrt{dx+c} \right ) \cos \left ( a+b\sqrt{dx+c} \right ) \right ) }{{b}^{2}}}+3\,{\frac{{a}^{2} \left ( \cos \left ( a+b\sqrt{dx+c} \right ) + \left ( a+b\sqrt{dx+c} \right ) \sin \left ( a+b\sqrt{dx+c} \right ) \right ) }{{b}^{2}}}-{\frac{{a}^{3}\sin \left ( a+b\sqrt{dx+c} \right ) }{{b}^{2}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*cos(a+b*(d*x+c)^(1/2)),x)

[Out]

2/d^2/b^2*(-c*(cos(a+b*(d*x+c)^(1/2))+(a+b*(d*x+c)^(1/2))*sin(a+b*(d*x+c)^(1/2)))+c*a*sin(a+b*(d*x+c)^(1/2))+1
/b^2*((a+b*(d*x+c)^(1/2))^3*sin(a+b*(d*x+c)^(1/2))+3*(a+b*(d*x+c)^(1/2))^2*cos(a+b*(d*x+c)^(1/2))-6*cos(a+b*(d
*x+c)^(1/2))-6*(a+b*(d*x+c)^(1/2))*sin(a+b*(d*x+c)^(1/2)))-3/b^2*a*((a+b*(d*x+c)^(1/2))^2*sin(a+b*(d*x+c)^(1/2
))-2*sin(a+b*(d*x+c)^(1/2))+2*(a+b*(d*x+c)^(1/2))*cos(a+b*(d*x+c)^(1/2)))+3*a^2/b^2*(cos(a+b*(d*x+c)^(1/2))+(a
+b*(d*x+c)^(1/2))*sin(a+b*(d*x+c)^(1/2)))-1/b^2*a^3*sin(a+b*(d*x+c)^(1/2)))

________________________________________________________________________________________

Maxima [A]  time = 1.25414, size = 355, normalized size = 2.13 \begin{align*} \frac{2 \,{\left (a c \sin \left (\sqrt{d x + c} b + a\right ) -{\left ({\left (\sqrt{d x + c} b + a\right )} \sin \left (\sqrt{d x + c} b + a\right ) + \cos \left (\sqrt{d x + c} b + a\right )\right )} c - \frac{a^{3} \sin \left (\sqrt{d x + c} b + a\right )}{b^{2}} + \frac{3 \,{\left ({\left (\sqrt{d x + c} b + a\right )} \sin \left (\sqrt{d x + c} b + a\right ) + \cos \left (\sqrt{d x + c} b + a\right )\right )} a^{2}}{b^{2}} - \frac{3 \,{\left (2 \,{\left (\sqrt{d x + c} b + a\right )} \cos \left (\sqrt{d x + c} b + a\right ) +{\left ({\left (\sqrt{d x + c} b + a\right )}^{2} - 2\right )} \sin \left (\sqrt{d x + c} b + a\right )\right )} a}{b^{2}} + \frac{3 \,{\left ({\left (\sqrt{d x + c} b + a\right )}^{2} - 2\right )} \cos \left (\sqrt{d x + c} b + a\right ) +{\left ({\left (\sqrt{d x + c} b + a\right )}^{3} - 6 \, \sqrt{d x + c} b - 6 \, a\right )} \sin \left (\sqrt{d x + c} b + a\right )}{b^{2}}\right )}}{b^{2} d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(a+b*(d*x+c)^(1/2)),x, algorithm="maxima")

[Out]

2*(a*c*sin(sqrt(d*x + c)*b + a) - ((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b + a))*
c - a^3*sin(sqrt(d*x + c)*b + a)/b^2 + 3*((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b
 + a))*a^2/b^2 - 3*(2*(sqrt(d*x + c)*b + a)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^2 - 2)*sin(sqrt(
d*x + c)*b + a))*a/b^2 + (3*((sqrt(d*x + c)*b + a)^2 - 2)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^3
- 6*sqrt(d*x + c)*b - 6*a)*sin(sqrt(d*x + c)*b + a))/b^2)/(b^2*d^2)

________________________________________________________________________________________

Fricas [A]  time = 1.63106, size = 166, normalized size = 0.99 \begin{align*} \frac{2 \,{\left ({\left (b^{3} d x - 6 \, b\right )} \sqrt{d x + c} \sin \left (\sqrt{d x + c} b + a\right ) +{\left (3 \, b^{2} d x + 2 \, b^{2} c - 6\right )} \cos \left (\sqrt{d x + c} b + a\right )\right )}}{b^{4} d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(a+b*(d*x+c)^(1/2)),x, algorithm="fricas")

[Out]

2*((b^3*d*x - 6*b)*sqrt(d*x + c)*sin(sqrt(d*x + c)*b + a) + (3*b^2*d*x + 2*b^2*c - 6)*cos(sqrt(d*x + c)*b + a)
)/(b^4*d^2)

________________________________________________________________________________________

Sympy [A]  time = 0.684471, size = 151, normalized size = 0.9 \begin{align*} \begin{cases} \frac{x^{2} \cos{\left (a \right )}}{2} & \text{for}\: b = 0 \wedge \left (b = 0 \vee d = 0\right ) \\\frac{x^{2} \cos{\left (a + b \sqrt{c} \right )}}{2} & \text{for}\: d = 0 \\\frac{2 x \sqrt{c + d x} \sin{\left (a + b \sqrt{c + d x} \right )}}{b d} + \frac{4 c \cos{\left (a + b \sqrt{c + d x} \right )}}{b^{2} d^{2}} + \frac{6 x \cos{\left (a + b \sqrt{c + d x} \right )}}{b^{2} d} - \frac{12 \sqrt{c + d x} \sin{\left (a + b \sqrt{c + d x} \right )}}{b^{3} d^{2}} - \frac{12 \cos{\left (a + b \sqrt{c + d x} \right )}}{b^{4} d^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(a+b*(d*x+c)**(1/2)),x)

[Out]

Piecewise((x**2*cos(a)/2, Eq(b, 0) & (Eq(b, 0) | Eq(d, 0))), (x**2*cos(a + b*sqrt(c))/2, Eq(d, 0)), (2*x*sqrt(
c + d*x)*sin(a + b*sqrt(c + d*x))/(b*d) + 4*c*cos(a + b*sqrt(c + d*x))/(b**2*d**2) + 6*x*cos(a + b*sqrt(c + d*
x))/(b**2*d) - 12*sqrt(c + d*x)*sin(a + b*sqrt(c + d*x))/(b**3*d**2) - 12*cos(a + b*sqrt(c + d*x))/(b**4*d**2)
, True))

________________________________________________________________________________________

Giac [B]  time = 1.24896, size = 479, normalized size = 2.87 \begin{align*} -\frac{2 \,{\left (\frac{{\left (b^{2} c \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - 3 \,{\left (\sqrt{d x + c} b + a\right )}^{2} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + 6 \,{\left (\sqrt{d x + c} b + a\right )} a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - 3 \, a^{2} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + 6 \, \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right )\right )} \cos \left (-{\left (\sqrt{d x + c} b + a\right )} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - a\right )}{b} - \frac{{\left ({\left (\sqrt{d x + c} b + a\right )} b^{2} c - a b^{2} c -{\left (\sqrt{d x + c} b + a\right )}^{3} + 3 \,{\left (\sqrt{d x + c} b + a\right )}^{2} a - 3 \,{\left (\sqrt{d x + c} b + a\right )} a^{2} + a^{3} + 6 \, \sqrt{d x + c} b\right )} \sin \left (-{\left (\sqrt{d x + c} b + a\right )} \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) + a \mathrm{sgn}\left ({\left (\sqrt{d x + c} b + a\right )} b - a b\right ) - a\right )}{b}\right )}}{b^{3} d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*cos(a+b*(d*x+c)^(1/2)),x, algorithm="giac")

[Out]

-2*((b^2*c*sgn((sqrt(d*x + c)*b + a)*b - a*b) - 3*(sqrt(d*x + c)*b + a)^2*sgn((sqrt(d*x + c)*b + a)*b - a*b) +
 6*(sqrt(d*x + c)*b + a)*a*sgn((sqrt(d*x + c)*b + a)*b - a*b) - 3*a^2*sgn((sqrt(d*x + c)*b + a)*b - a*b) + 6*s
gn((sqrt(d*x + c)*b + a)*b - a*b))*cos(-(sqrt(d*x + c)*b + a)*sgn((sqrt(d*x + c)*b + a)*b - a*b) + a*sgn((sqrt
(d*x + c)*b + a)*b - a*b) - a)/b - ((sqrt(d*x + c)*b + a)*b^2*c - a*b^2*c - (sqrt(d*x + c)*b + a)^3 + 3*(sqrt(
d*x + c)*b + a)^2*a - 3*(sqrt(d*x + c)*b + a)*a^2 + a^3 + 6*sqrt(d*x + c)*b)*sin(-(sqrt(d*x + c)*b + a)*sgn((s
qrt(d*x + c)*b + a)*b - a*b) + a*sgn((sqrt(d*x + c)*b + a)*b - a*b) - a)/b)/(b^3*d^2)